From: Jonas Ã…dahl Date: Tue, 16 Aug 2022 10:40:57 +0000 (+0200) Subject: scripting: Exit helper after running test X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~405^2^2~245 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=67d965d560facf2233d572567b8db99b4febcb5e;p=gnome-shell.git scripting: Exit helper after running test This avoids the helper process exiting with an error due to a broken pipe. Part-of: --- diff --git a/data/dbus-interfaces/org.gnome.Shell.PerfHelper.xml b/data/dbus-interfaces/org.gnome.Shell.PerfHelper.xml index 98fea27e9..140bbcc34 100644 --- a/data/dbus-interfaces/org.gnome.Shell.PerfHelper.xml +++ b/data/dbus-interfaces/org.gnome.Shell.PerfHelper.xml @@ -1,5 +1,6 @@ + diff --git a/js/ui/scripting.js b/js/ui/scripting.js index a4d80d749..76a74d5e8 100644 --- a/js/ui/scripting.js +++ b/js/ui/scripting.js @@ -284,6 +284,15 @@ async function _runPerfScript(scriptModule, outputFile) { log(`Script failed: ${err}\n${err.stack}`); Meta.exit(Meta.ExitCode.ERROR); } + + try { + const perfHelper = _getPerfHelper(); + perfHelper.ExitSync(); + } catch (err) { + log(`Failed to exit helper: ${err}\n${err.stack}`); + Meta.exit(Meta.ExitCode.ERROR); + } + Meta.exit(Meta.ExitCode.SUCCESS); }